package java4;

import java.util.Scanner;

public class Code046 {
	public static void main(String[] args){
		  System.out.println("\t用户登录");
		  System.out.println("********************");
		  String zzh = "123456";
		  String zmm = "123456";
		  Scanner input = new Scanner(System.in);
		  System.out.println("请输入账号:");
		  String zh = input.next();
		  System.out.println("请输入密码:");
		  String mm = input.next();
		  if(!zh.equals(zzh)){
			  System.out.println("用户账号错误！");
			  }
		  else if(!mm.equals(zmm)){
			  System.out.println("密码错误"); 
		  }
		  else {
			  int zyzm;
			  zyzm = (int)(Math.random()*(8999)+1000);
			  System.out.println("您的随机验证码是:"+zyzm);
			  System.out.println("请输入验证码");
			int yzm = input.nextInt();
			  if (yzm==zyzm){
				  System.out.println("登录成功！");
				  
			  }
			  else{
				  System.out.println("验证码错误！");
			  }
			  
		  }
		  
		  
	  }
	}

